<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- style：对象写法
        <div :style="{color:'pink',fontSize:'40px'}">i love you </div>
         把对象写在data里面直接引入 
        <div :style="boxStyle">i love you to</div> -->

        <!-- style:数组的写法
            可以书写多个样式 -->
        <div :style="[style1,style3,style2]"> i love you </div>
        <div :style="[style2,style4]">i love you to</div>
    </div>
    <script>
        Vue.config.productionTip = false;

        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    //style的对象写法
                    // boxStyle:{
                    //     color:"pink",
                    //     fontSize:"40px",
                    //     fontWeight:"bold",
                    // }
                    style1: { color: "pink" },
                    style2: { fontSize: "30px" },
                    style3: { fontStyle: "xinsong" },
                    style4: { textShadow: "1px 3px 3px green" }
                }
            }
        })
    </script>
</body>

</html>